home *** CD-ROM | disk | FTP | other *** search
- #include <stdio.h>
- #include <conio2.h>
- #include <dir.h>
- #include <fcntl.h>
- #include <dos.h>
- #include <io.h>
- #include <stdlib.h>
- #include <process.h>
-
- void Usage(void);
-
- void main(int argc, char *argv[])
- {
- int done=0;
- struct ffblk dta;
- char mycomm[11], MYCOMM[11], TO_EXE[100];
- FILE *fp;
-
- if(argc==1 || strstr(argv[1], "?")) Usage();
-
- if((fp=fopen(argv[1], "rb"))==NULL){ printf("\n Error opening %s", argv[1]); exit(1); }
- fseek(fp, -9L, SEEK_END);
- fgets(MYCOMM, 9, fp);
- fclose(fp);
-
-
- done=findfirst("*.ZIP", &dta, 0);
- while(!done)
- {
-
- if((fp=fopen(dta.ff_name, "rb"))==NULL)
- { printf("\nProblems opening %s\n", dta.ff_name); exit(1); }
-
- printf("\n %s", dta.ff_name);
-
- fseek(fp, -10L, SEEK_END);
- fread(mycomm, 10, 1, fp);
- if(!strstr(mycomm, MYCOMM))
- {
- printf(" --> Added %s", argv[1]);
- sprintf(TO_EXE, "PKZIP -z %s < %s", dta.ff_name, argv[1]);
- system(TO_EXE);
- }
- fclose(fp);
-
- done=findnext(&dta);
- }
-
- }
-
-
- void Usage(void)
- {
- printf("\n QCOM [ The Quick .ZIP Commenter ]");
- printf("\n\n Doesn't comment the .ZIP unless it NEEDS to!");
- printf("\n Freeware from the maker of STEALTH : David Smith");
- printf("\n\n Usage: QCOM [commentfile]");
- printf("\n\n QCOM c:\comment.txt");
- printf("\n QCOM d:\pcb\comment.pcb");
- printf("\n QCOM d:\wc30\comment.bbs");
- printf("\n\n FREEWARE - Of Course: Source is included");
- exit(0);
- }
-
-